/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CoordinadorServicioClienteUI.java
 *
 * Created on 8/06/2009, 09:21:52 AM
 */

package CRM_UI;

import java.awt.Cursor;

/**
 *
 * @author L¡z
 */
public class CoordinadorServicioClienteUI extends javax.swing.JFrame {

    /** Creates new form CoordinadorServicioClienteUI */
    Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
    Cursor defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR);
    String login;
    LoginUI cambiarPerfil;

    public CoordinadorServicioClienteUI(String login,LoginUI cambiarPerfil)
    {
        initComponents();
        this.login = login;
        setLocationRelativeTo(null);
        this.cambiarPerfil=cambiarPerfil;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        titleLabel = new javax.swing.JLabel();
        cscLabel = new javax.swing.JLabel();
        rscLabel = new javax.swing.JLabel();
        cscImgLabel = new javax.swing.JLabel();
        rscImgLabel = new javax.swing.JLabel();
        accionesImgLabel = new javax.swing.JLabel();
        accionesLabel = new javax.swing.JLabel();
        reportesImgLabel = new javax.swing.JLabel();
        reportesLabel = new javax.swing.JLabel();
        passLabel = new javax.swing.JLabel();
        passImgLabel = new javax.swing.JLabel();
        botonPerfil = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        titleLabel.setFont(new java.awt.Font("Berlin Sans FB", 0, 18));
        titleLabel.setText("Coordinador de Servicio al Cliente");

        cscLabel.setText("Casos de Servicio al Cliente");

        rscLabel.setText("Representantes de \nServicio al Cliente");

        cscImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/csc.png"))); // NOI18N
        cscImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cscImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                cscImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                cscImgLabelMouseExited(evt);
            }
        });

        rscImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/empleado.png"))); // NOI18N
        rscImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rscImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                rscImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                rscImgLabelMouseExited(evt);
            }
        });

        accionesImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/acciones.png"))); // NOI18N
        accionesImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                accionesImgLabelMouseExited(evt);
            }
        });

        accionesLabel.setText("Acciones");

        reportesImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/WOA_CandyBar Toolbar - Documents.png"))); // NOI18N
        reportesImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                reportesImgLabelMouseExited(evt);
            }
        });

        reportesLabel.setText("Reportes");

        passLabel.setText("Contraseña");

        passImgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Lock.png"))); // NOI18N
        passImgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                passImgLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                passImgLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                passImgLabelMouseExited(evt);
            }
        });

        botonPerfil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/cambiarPerfil.png"))); // NOI18N
        botonPerfil.setToolTipText("Permite al usuario cambiar de perfil");
        botonPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPerfilActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(cscLabel)
                            .addComponent(cscImgLabel))
                        .addGap(32, 32, 32)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(rscLabel)
                            .addComponent(rscImgLabel))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(46, 46, 46)
                                .addComponent(accionesLabel))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(36, 36, 36)
                                .addComponent(accionesImgLabel))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(botonPerfil, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(71, 71, 71)
                        .addComponent(titleLabel))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(141, 141, 141)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(reportesImgLabel)
                            .addComponent(reportesLabel))
                        .addGap(89, 89, 89)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(passLabel)
                            .addComponent(passImgLabel))))
                .addGap(56, 56, 56))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(titleLabel)
                    .addComponent(botonPerfil, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(cscImgLabel)
                    .addComponent(rscImgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(accionesImgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cscLabel)
                    .addComponent(rscLabel)
                    .addComponent(accionesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(reportesImgLabel)
                    .addComponent(passImgLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(reportesLabel)
                    .addComponent(passLabel))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 468, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void accionesImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        GestionarAccionesUI objGestionarAccionesUI = new GestionarAccionesUI(this);
        objGestionarAccionesUI.setVisible(true);
}//GEN-LAST:event_accionesImgLabelMouseClicked

    private void cscImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cscImgLabelMouseClicked
        // TODO add your handling code here:
        //this.setVisible(false);
        GestionarCSC_UI csc= new GestionarCSC_UI();
        csc.setVisible(true);
}//GEN-LAST:event_cscImgLabelMouseClicked

    private void cscImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cscImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_cscImgLabelMouseEntered

    private void cscImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cscImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_cscImgLabelMouseExited

    private void rscImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rscImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_rscImgLabelMouseEntered

    private void rscImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rscImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_rscImgLabelMouseExited

    private void rscImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rscImgLabelMouseClicked
        // TODO add your handling code here
        this.setVisible(false);
        GestionarRSC_UI empleado = new GestionarRSC_UI(this, "SC");
        empleado.setVisible(true);
    }//GEN-LAST:event_rscImgLabelMouseClicked

    private void accionesImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_accionesImgLabelMouseEntered

    private void accionesImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionesImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_accionesImgLabelMouseExited

    private void reportesImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseClicked
        // TODO add your handling code here:
        ReportesCoordServClienteUI objReporte = new ReportesCoordServClienteUI();
        objReporte.setVisible(true);
    }//GEN-LAST:event_reportesImgLabelMouseClicked

    private void reportesImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_reportesImgLabelMouseEntered

    private void reportesImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_reportesImgLabelMouseExited

    private void passImgLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passImgLabelMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        ContraseNaUI password = new ContraseNaUI(login, this);
        password.setVisible(true);
    }//GEN-LAST:event_passImgLabelMouseClicked

    private void passImgLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passImgLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_passImgLabelMouseEntered

    private void passImgLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_passImgLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_passImgLabelMouseExited

    private void botonPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPerfilActionPerformed
        // TODO add your handling code here:
      //  this.setVisible(false);
        this.dispose();
        cambiarPerfil.limpiarCampos();
        cambiarPerfil.setVisible(true);


}//GEN-LAST:event_botonPerfilActionPerformed


    /**
    * @param args the command line arguments
    */

    /*
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CoordinadorServicioClienteUI().setVisible(true);
            }
        });
    }
     * */

  
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel accionesImgLabel;
    private javax.swing.JLabel accionesLabel;
    private javax.swing.JButton botonPerfil;
    private javax.swing.JLabel cscImgLabel;
    private javax.swing.JLabel cscLabel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel passImgLabel;
    private javax.swing.JLabel passLabel;
    private javax.swing.JLabel reportesImgLabel;
    private javax.swing.JLabel reportesLabel;
    private javax.swing.JLabel rscImgLabel;
    private javax.swing.JLabel rscLabel;
    private javax.swing.JLabel titleLabel;
    // End of variables declaration//GEN-END:variables

}
